<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: Single 64 bit Index Table</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Single 64 bit Index Table<div class="ingroups"><a class="el" href="group__contractdev.html">How To Write Contracts</a> &raquo; <a class="el" href="group__database.html">Database API</a> &raquo; <a class="el" href="group__database_c.html">Database C API</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>These methods interface with a simple table with 64 bit unique primary key and arbitrary binary data value.  
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Single 64 bit Index Table:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group__dbi64.png" border="0" alt="" usemap="#group____dbi64"/>
<map name="group____dbi64" id="group____dbi64">
<area shape="rect" id="node1" href="group__database_c.html" title="C APIs for interfacing with the database. " alt="" coords="5,13,124,39"/>
</map>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad62abe6567bdf68ebd2464e757fdced8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gad62abe6567bdf68ebd2464e757fdced8">store_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, const void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gad62abe6567bdf68ebd2464e757fdced8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa55fd3a61e92cca6915da5e3462af356"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gaa55fd3a61e92cca6915da5e3462af356">update_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, const void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gaa55fd3a61e92cca6915da5e3462af356"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaccf780f690898ee813641128e4cc32d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gaccf780f690898ee813641128e4cc32d9">load_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> code, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gaccf780f690898ee813641128e4cc32d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8cd697b3b8c287dc3e86cd46a6d9f679"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga8cd697b3b8c287dc3e86cd46a6d9f679">front_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> code, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga8cd697b3b8c287dc3e86cd46a6d9f679"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1d20a7cfeaeeb518c5d2f01e01921eb3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga1d20a7cfeaeeb518c5d2f01e01921eb3">back_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> code, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga1d20a7cfeaeeb518c5d2f01e01921eb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga556f760298474c0d63b6ae4902d80807"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga556f760298474c0d63b6ae4902d80807">next_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> code, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga556f760298474c0d63b6ae4902d80807"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9bf6ae9b3970225e7826ca78bfc7596c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga9bf6ae9b3970225e7826ca78bfc7596c">previous_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> code, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga9bf6ae9b3970225e7826ca78bfc7596c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga900fe3878982d997bc209a7d4bdec832"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga900fe3878982d997bc209a7d4bdec832">lower_bound_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> code, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga900fe3878982d997bc209a7d4bdec832"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga60a0e0fccf19b87bd6b951dc95b9c00a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga60a0e0fccf19b87bd6b951dc95b9c00a">upper_bound_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> code, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga60a0e0fccf19b87bd6b951dc95b9c00a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d65c93eda8fbf3f588f06d09050d129"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga5d65c93eda8fbf3f588f06d09050d129">remove_i64</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> scope, <a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a> table, void *data)</td></tr>
<tr class="separator:ga5d65c93eda8fbf3f588f06d09050d129"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="struct_table.html">Table</a> class in C++ API</dd></dl>
<p>Example </p><div class="fragment"><div class="line"><span class="preprocessor">#pragma pack(push, 1)</span></div><div class="line"><span class="keyword">struct </span><a class="code" href="struct_test_model.html">TestModel</a> {</div><div class="line">   <a class="code" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>   <a class="code" href="struct_test_model.html#ac5fefdad999c22c304761fbca4e090a1">name</a>;</div><div class="line">   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_test_model.html#abc50651849938a8bf97e986a210fc503">age</a>;</div><div class="line">   <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>      <a class="code" href="struct_test_model.html#a8013df125ab65020ecc79559743b651c">phone</a>;</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="struct_test_model.html">TestModel</a> alice{ <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice), 20, 4234622};</div><div class="line"><a class="code" href="struct_test_model.html">TestModel</a> bob  { <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob),   15, 11932435};</div><div class="line"><a class="code" href="struct_test_model.html">TestModel</a> carol{ <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(carol), 30, 545342453};</div><div class="line"><a class="code" href="struct_test_model.html">TestModel</a> dave { <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(dave),  46, 6535354};</div><div class="line"></div><div class="line"><a class="code" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> res = <a class="code" href="group__dbi64.html#gad62abe6567bdf68ebd2464e757fdced8">store_i64</a>(CurrentCode(),  <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;dave,  <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>));</div><div class="line">res = <a class="code" href="group__dbi64.html#gad62abe6567bdf68ebd2464e757fdced8">store_i64</a>(CurrentCode(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;carol, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>));</div><div class="line">res = <a class="code" href="group__dbi64.html#gad62abe6567bdf68ebd2464e757fdced8">store_i64</a>(CurrentCode(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;bob, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>));</div><div class="line">res = <a class="code" href="group__dbi64.html#gad62abe6567bdf68ebd2464e757fdced8">store_i64</a>(CurrentCOde(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;alice, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>));</div><div class="line"><a class="code" href="struct_test_model.html">TestModel</a> alice;</div><div class="line">alice.<a class="code" href="struct_test_model.html#ac5fefdad999c22c304761fbca4e090a1">name</a> = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice);</div><div class="line">res = <a class="code" href="group__dbi64.html#gaccf780f690898ee813641128e4cc32d9">load_i64</a>( <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;alice, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice) &amp;&amp; tmp.age == 20 &amp;&amp; tmp.phone == 4234622, <span class="stringliteral">&quot;load_i64&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#ga8cd697b3b8c287dc3e86cd46a6d9f679">front_i64</a>( <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice) &amp;&amp; tmp.age == 20 &amp;&amp; tmp.phone == 4234622, <span class="stringliteral">&quot;front_i64 1&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#ga1d20a7cfeaeeb518c5d2f01e01921eb3">back_i64</a>( <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(dave) &amp;&amp; tmp.age == 46 &amp;&amp; tmp.phone == 6535354, <span class="stringliteral">&quot;back_i64 2&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#ga9bf6ae9b3970225e7826ca78bfc7596c">previous_i64</a>( <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(carol) &amp;&amp; tmp.age == 30 &amp;&amp; tmp.phone == 545342453, <span class="stringliteral">&quot;carol previous&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#ga556f760298474c0d63b6ae4902d80807">next_i64</a>( <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(dave) &amp;&amp; tmp.age == 46 &amp;&amp; tmp.phone == 6535354, <span class="stringliteral">&quot;back_i64 2&quot;</span>);</div><div class="line"></div><div class="line"><a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> key = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice);</div><div class="line">res = <a class="code" href="group__dbi64.html#ga5d65c93eda8fbf3f588f06d09050d129">remove_i64</a>(<a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;key);</div><div class="line">ASSERT(res == 1, <span class="stringliteral">&quot;remove alice&quot;</span>);</div><div class="line"></div><div class="line"><a class="code" href="struct_test_model.html">TestModel</a> lb;</div><div class="line">lb.<a class="code" href="struct_test_model.html#ac5fefdad999c22c304761fbca4e090a1">name</a> = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob);</div><div class="line">res = <a class="code" href="group__dbi64.html#ga900fe3878982d997bc209a7d4bdec832">lower_bound_i64</a>( <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;lb, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) &amp;&amp; lb.<a class="code" href="struct_test_model.html#ac5fefdad999c22c304761fbca4e090a1">name</a> == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob), <span class="stringliteral">&quot;lower_bound_i64 bob&quot;</span> );</div><div class="line"></div><div class="line"><a class="code" href="struct_test_model.html">TestModel</a> ub;</div><div class="line">ub.<a class="code" href="struct_test_model.html#ac5fefdad999c22c304761fbca4e090a1">name</a> = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice);</div><div class="line">res = <a class="code" href="group__dbi64.html#ga60a0e0fccf19b87bd6b951dc95b9c00a">upper_bound_i64</a>( <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__messagecapi.html#ga1f06c06adc584456cf30e8086d6b55b1">currentCode</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;ub, <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="struct_test_model.html">TestModel</a>) &amp;&amp; ub.<a class="code" href="struct_test_model.html#abc50651849938a8bf97e986a210fc503">age</a> == 15 &amp;&amp; ub.<a class="code" href="struct_test_model.html#ac5fefdad999c22c304761fbca4e090a1">name</a> == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob), <span class="stringliteral">&quot;upper_bound_i64 bob&quot;</span> );</div></div><!-- fragment --> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga1d20a7cfeaeeb518c5d2f01e01921eb3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> back_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the back record </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if no record found </dd></dl>

</div>
</div>
<a class="anchor" id="ga8cd697b3b8c287dc3e86cd46a6d9f679"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> front_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the front record </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if no record found </dd></dl>

</div>
</div>
<a class="anchor" id="gaccf780f690898ee813641128e4cc32d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> load_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the stored record, should be initialized with the key to get </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a class="anchor" id="ga900fe3878982d997bc209a7d4bdec832"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> lower_bound_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the lower bound. Should be initialized with the key to find lower bound of. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a class="anchor" id="ga556f760298474c0d63b6ae4902d80807"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> next_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the next record. Should be initialized with the key to get next record. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a class="anchor" id="ga9bf6ae9b3970225e7826ca78bfc7596c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> previous_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the previous record. Should be initialized with the key to get previous record. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a class="anchor" id="ga5d65c93eda8fbf3f588f06d09050d129"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> remove_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account socpe that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table withing the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- must point to at lest 8 bytes containing primary key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if a record was removed, and 0 if no record with key was found </dd></dl>

</div>
</div>
<a class="anchor" id="gad62abe6567bdf68ebd2464e757fdced8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> store_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the current scope/code context to modify</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if a new record was created, 0 if an existing record was updated</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>datalen &gt;= sizeof(uint64_t) </dd>
<dd>
data is a valid pointer to a range of memory at least datalen bytes long </dd>
<dd>
*((uint64_t*)data) stores the primary key </dd>
<dd>
scope is declared by the current transaction </dd>
<dd>
this method is being called from an apply context (not validate or precondition)</dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>a record is either created or updated with the given scope and table.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">if</td><td>called with an invalid precondition execution will be aborted </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa55fd3a61e92cca6915da5e3462af356"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> update_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the current scope/code context to modify</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the record was updated, 0 if no record with key was found</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>datalen &gt;= sizeof(uint64_t) </dd>
<dd>
data is a valid pointer to a range of memory at least datalen bytes long </dd>
<dd>
*((uint64_t*)data) stores the primary key </dd>
<dd>
scope is declared by the current transaction </dd>
<dd>
this method is being called from an apply context (not validate or precondition)</dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>a record is either created or updated with the given scope and table.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">if</td><td>called with an invalid precondition execution will be aborted </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga60a0e0fccf19b87bd6b951dc95b9c00a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> upper_bound_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga1d259d7ad615daec723290ee9f766dc5">TableName</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the upper bound. Should be initialized with the key to find upper bound of. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
